package com.jcl.recruit.basic.register.model;

import java.util.HashMap;

/**
 * @ClassName RegisterResultContent
 * @Author yyliu
 * @Date 2018/12/17 10:34
 * @Version 1.0
 **/
public class RegisterResultContent {

    public static final String SUCCESS_CODE = "EXIST-20000";
    public static final String CORP_EXIST_CODE = "EXIST-20001";
    private static final String SUCCESS_MSG = "注册成功";
    private static final String CORP_EXIST_MSG = "您注册的企业已经存在";

    private static HashMap<String, String> result_content = new HashMap<>();

    static {
        result_content.put(SUCCESS_CODE, SUCCESS_MSG);
        result_content.put(CORP_EXIST_CODE, CORP_EXIST_MSG);
    }

    public static String getMsg(String code) {
        return result_content.get(code);
    }

    public static Boolean hasError(String code){
        return !SUCCESS_CODE.equals(code) ? true : false;
    }
}
